package com.snpic.appaw.module.third.api.jpush;

import com.snpic.appaw.framework.common.pojo.CommonResult;
import com.snpic.appaw.module.third.api.jpush.dto.LoginTokenVerifyReqDTO;
import com.snpic.appaw.module.third.api.jpush.dto.LoginTokenVerifyRespDTO;
import com.snpic.appaw.module.third.service.jpush.JPushService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JiJun
 * @date 2025/9/9 17:04
 * @修改时间 2025/9/9 17:04
 * @description 极光一键登录API
 */
@RestController // 提供 RESTful API 接口，给 Feign 调用
@Validated
@Slf4j
public class JPushApiImpl implements JPushApi {
	@Resource
	private JPushService jPushService;


	@Override
	public CommonResult<LoginTokenVerifyRespDTO> loginTokenVerify_H5(LoginTokenVerifyReqDTO reqDTO) {
		LoginTokenVerifyRespDTO respDTO = jPushService.loginTokenVerify_H5(reqDTO);
		log.info("极光一键登录_H5, reqDTO: {}, respDTO: {}", reqDTO, respDTO);
		return CommonResult.success(respDTO);
	}
}
